Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Skatepark: Add space below the Featured Image on the single post page #5061

Merged

Conversation

danieldudzic
Copy link
Contributor

@danieldudzic danieldudzic commented Nov 18, 2021

The logic behind the calc() code is trying to mimic the way the space gets calculated when a Featured Image isn't set.

Before:
space

After:
star

Closes #4976

The logic behind the calc() code is trying to mimic the way the space gets calculated when a Featured Image isn't set
@danieldudzic danieldudzic requested a review from a team November 18, 2021 16:20
@@ -9,7 +9,7 @@

<!-- wp:group {"align":"full"} -->
<div class="wp-block-group alignfull">
<!-- wp:post-featured-image {"align":"full"} /--></div>
<!-- wp:post-featured-image {"align":"full", "style":{"spacing":{"margin":{"bottom":"calc(2*var(--wp--style--block-gap) + 3*var(--wp--custom--gap--horizontal))"}}}} /--></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be using var() or calc() in block markup; It doesn't work in the FSE when you load that block template. It makes the block markup more verbose, but I'm of the opinion that we should be verbose there, even if it means more manual changes when things like "block gap" needs to change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About this, looks like there's a proposal so that those values are not empty on the block sidebar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaggieCabrera Perhaps this PR could be moved to Approved but not mergable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I think we can merge this anyway, since only the UI is affected by the future change and not the actual looks of the site

Copy link
Contributor

@MaggieCabrera MaggieCabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to go

@scruffian scruffian merged commit 6c4d55e into trunk Nov 24, 2021
@scruffian scruffian deleted the fix/4976-skatepark-add-spacing-below-featured-image branch November 24, 2021 12:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skatepark: Add more spacing between featured image and post content
4 participants